﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Web.WebPages.Html;
using System.Web.Mvc;
using lucienneCRMApp.Models;
using System.Data.Objects.SqlClient;
using System.ComponentModel;


namespace lucienneCRMApp.Models
{
    public class Person
    {

        lucienneCRMAppContext context = new lucienneCRMAppContext();
        TypesModel tm = new TypesModel();
        
        [Key]
     
       //[Required(ErrorMessage = "PersonIDName is required")]
        public int PersonId { get; set; }

        //public string EmployeeName { get; set; }
        // [Required(ErrorMessage = "EmployeeID is required")]
        // public int EmployeeID { get; set; }
        
        [Required(ErrorMessage = "Name is required")]
        [Column(TypeName = "ntext")]
        public virtual string PersonName { get; set; }

        [Required(ErrorMessage = "Surname is required")]
        [Column(TypeName = "ntext")]
        public string PersonSurname { get; set; }

       
        [Required(ErrorMessage = "Email address is required")]

        [DataType(DataType.EmailAddress)]

        [Display(Name = "Email address")]
        [Column(TypeName = "ntext")]
        public string emailAdd { get; set; }

        [Required(ErrorMessage = "Password is required")]
        //[ValidatePasswordLength]

        [DataType(DataType.Password)]
        //[Display(Name = "Password")]
        [Column(TypeName = "ntext")]
        public string password { get; set; }
        ////[Required(ErrorMessage = "Confirm Password is required")]
        //[DataType(DataType.Password)]
        ////   [Display(Name = "Confirm password")]
        //[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
        //public string ConfirmPassword { get; set; }
         [Required(ErrorMessage = "staff is required")]

        [DisplayName("Types")]
        public int StaffType { get; set; }

        public virtual TypesModel typesmodel { get; set; }


    }

    public class LogOnModel
    {
        [Required]
        public string emailAdd { get; set; }

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "password")]
        public string password { get; set; }

    }

    public class ContactUs
    {
        [Required(ErrorMessage = "You need to fill in a name")]
        [DisplayName("Name")]
        public string CName { get; set; }
 
        [Required(ErrorMessage = "You need to fill in an email address")]
        [DataType(DataType.EmailAddress, ErrorMessage = "Your email address contains some errors")]
        [DisplayName("Email address")]
        public string CEmail { get; set; }
 
        [Required(ErrorMessage = "You need to fill in a comment")]
        [DisplayName("Your comment")]
        public string Message { get; set; }
    }

    public class Survey
    {
        [Required(ErrorMessage = "You need to fill in a comment")]
        [DisplayName("What did you like most during this dive?")]
        public string question1 { get; set; }

        [Required(ErrorMessage = "You need to fill in a comment")]
        [DisplayName("Who was your instructor? Did you like him?")]
        public string question2 { get; set; }

        [Required(ErrorMessage = "You need to fill in a comment")]
        [DisplayName("Would you come again?")]
        public string question3 { get; set; }

        [Required(ErrorMessage = "You need to fill in a comment")]
        [DisplayName("Help us Improve. Provide us with any suggestions:")]
        public string question4 { get; set; }

        [DataType(DataType.EmailAddress, ErrorMessage = "Your email address contains some errors")]
        [DisplayName("Email address")]
        public string CEmail { get; set; }
                
    }

    public class GuestBookEntry
    {
      
        [Key]

        //[Required(ErrorMessage = "PersonIDName is required")]
        public int EntryId { get; set; }

        [StringLength(25)]
        [Required]
        public string NameSurname { get; set; }

        [DataType(DataType.EmailAddress)]
        [Required]
        public string Email { get; set; }

        [Required]
        [DataType(DataType.MultilineText)]
        public string Message { get; set; }

        private DateTime _posted = DateTime.Now;

            public DateTime Posted
            {
              get { return _posted; }
              set { _posted = value; }
            }
     }

    public class Bookings
    {

        [Key]

        //[Required(ErrorMessage = "PersonIDName is required")]
        public int BookingId { get; set; }

        [StringLength(25)]
        [Required]
        public string NameSurname { get; set; }

        [DataType(DataType.EmailAddress)]
        [Required]
        public string Email { get; set; }

        [Required]
        public string MobileNum { get; set; }

        
        [DataType(DataType.Date)]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:MM/dd/yyyy}")] 
        [Required]
        public DateTime BookDate { get; set; }

        
        [Required]
        public int PackageNum { get; set; }

        [Required]
        public int NumOfPeople { get; set; }

        [DataType(DataType.MultilineText)]
        public string Queries { get; set; }

        
    }

   
}